Skip to content

Commit

Permalink
Fixes to the SSL module.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfriend99 committed Aug 21, 2023
1 parent dbf8d6e commit 3c2e5ab
Show file tree
Hide file tree
Showing 27 changed files with 543 additions and 784 deletions.
8 changes: 4 additions & 4 deletions libs/bcrypt.b
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ def _generate_salt(rounds) {
*
* Generates a hash for the given string. If _salt_length_ is not given,
* the length of the salt will be equal to `DEFAULT_LOG2_ROUNDS`.
* @throws Exception
* @dies Exception
* @return string
*/
def hash(str, salt_length) {
Expand All @@ -683,7 +683,7 @@ def hash(str, salt_length) {
* compare(str: string, known_hash: string)
*
* Tests a string against a known hash.
* @throws Exception
* @dies Exception
* @return string
*/
def compare(str, known_hash) {
Expand Down Expand Up @@ -712,7 +712,7 @@ def compare(str, known_hash) {
* get_rounds(hash: string)
*
* Gets the number of rounds used to encrypt the specified hash.
* @throws Exception
* @dies Exception
* @return number
*/
def get_rounds(hash) {
Expand All @@ -726,7 +726,7 @@ def get_rounds(hash) {
*
* Gets the salt portion from a hash.
* @note This function does not validate the hash.
* @throws Exception
* @dies Exception
* @return string
*/
def get_salt(hash) {
Expand Down
10 changes: 5 additions & 5 deletions libs/http/client.b
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class HttpClient {
*
* @default method: GET
* @return HttpResponse
* @throws SocketException, Exception
* @dies SocketException, Exception
*/
send_request(uri, method, data) {

Expand Down Expand Up @@ -134,7 +134,7 @@ class HttpClient {
*
* sends an Http GET request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
get(url) {
return self.send_request(url, 'GET')
Expand All @@ -145,7 +145,7 @@ class HttpClient {
*
* sends an Http POST request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
post(url, data) {
return self.send_request(url, 'POST', data)
Expand All @@ -156,7 +156,7 @@ class HttpClient {
*
* sends an Http PUT request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
put(url, data) {
return self.send_request(url, 'PUT', data)
Expand All @@ -167,7 +167,7 @@ class HttpClient {
*
* sends an Http DELETE request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
delete(url) {
return self.send_request(url, 'DELETE', nil)
Expand Down
12 changes: 6 additions & 6 deletions libs/http/index.b
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ var _client = HttpClient()
* echo client.get('/current-user').body.to_string()
* ```
* @return HttpClient
* @throws Exception
* @dies Exception
*/
def set_headers(headers) {
if !is_dict(headers)
Expand All @@ -100,7 +100,7 @@ def set_headers(headers) {
* sends an Http GET request and returns an HttpResponse
* or throws one of SocketException or Exception if it fails.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
def get(url) {
return _client.get(url)
Expand All @@ -111,7 +111,7 @@ def get(url) {
*
* sends an Http POST request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
def post(url, data) {
return _client.post(url, data)
Expand All @@ -122,7 +122,7 @@ def post(url, data) {
*
* sends an Http PUT request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
def put(url, data) {
return _client.put(url, data)
Expand All @@ -133,7 +133,7 @@ def put(url, data) {
*
* sends an Http DELETE request and returns an HttpResponse.
* @return HttpResponse
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
def delete(url) {
return _client.send_request(url, 'DELETE', nil)
Expand All @@ -144,7 +144,7 @@ def delete(url) {
*
* Creates an new HttpServer instance.
* @return HttpServer
* @throws Exception, SocketExcepion, HttpException
* @dies Exception, SocketExcepion, HttpException
*/
def server(port, address) {
return HttpServer(port, address)
Expand Down
2 changes: 1 addition & 1 deletion libs/http/response.b
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class HttpResponse {
* correct mimetype for the file. If the status code is given, the
* response will be sent with the given status code.
*
* @throws {Exception}
* @dies {Exception}
*/
file(path, status_code) {
if status_code != nil {
Expand Down
Loading

0 comments on commit 3c2e5ab

Please sign in to comment.