* Returns a Uint8Array representation of a string, encoded in UTF-8. * @param str - String to convert. * @returns Uint8Array containing the UTF-8 encoded string.
(str: string)
| 81 | * @returns Uint8Array containing the UTF-8 encoded string. |
| 82 | */ |
| 83 | function stringToBuffer(str: string): Uint8Array { |
| 84 | const data = new Uint8Array(ByteUtils.utf8ByteLength(str)); |
| 85 | ByteUtils.encodeUTF8Into(data, str, 0); |
| 86 | return data; |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * This method implements AWS Signature 4 logic for a very specific request format. |
no outgoing calls
no test coverage detected