CryptoUtils class

Constructors

CryptoUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

base64Padded(String value) String
Helper function for add base64 decode padding
getBytesFromPEMString(String pem, {bool checkHeader = true}) Uint8List
Helper function for decoding the base64 in pem.
rsaPrivateKeyFromDERBytes(Uint8List bytes) → RSAPrivateKey
Decode the given bytes into an RSAPrivateKey.
rsaPrivateKeyFromPem(String pem) → RSAPrivateKey
Decode a RSAPrivateKey from the given pem String.
rsaPublicKeyFromDERBytes(Uint8List bytes) → RSAPublicKey
Decode the given bytes into an RSAPublicKey.
rsaPublicKeyFromPem(String pem) → RSAPublicKey
Decode a RSAPublicKey from the given pem String.
rsaSign(RSAPrivateKey privateKey, Uint8List dataToSign) Uint8List
Signing the given dataToSign with the given privateKey. algorithm support SHA-256/RSA only
rsaVerify(RSAPublicKey publicKey, Uint8List signedData, Uint8List signature) bool
Verifying the given signedData with the given publicKey and the given signature. Will return true if the given signature matches the signedData. algorithm support SHA-256/RSA only

Constants

beginPrivatekey → const String
endPrivateKey → const String
endPublicKey → const String
startPublickey → const String