CryptoUtils class
Constructors
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 anRSAPrivateKey
. -
rsaPrivateKeyFromPem(
String pem) → RSAPrivateKey -
Decode a
RSAPrivateKey
from the givenpem
String. -
rsaPublicKeyFromDERBytes(
Uint8List bytes) → RSAPublicKey -
Decode the given
bytes
into anRSAPublicKey
. -
rsaPublicKeyFromPem(
String pem) → RSAPublicKey -
Decode a
RSAPublicKey
from the givenpem
String. -
rsaSign(
RSAPrivateKey privateKey, Uint8List dataToSign) → Uint8List -
Signing the given
dataToSign
with the givenprivateKey
.algorithm
support SHA-256/RSA only -
rsaVerify(
RSAPublicKey publicKey, Uint8List signedData, Uint8List signature) → bool -
Verifying the given
signedData
with the givenpublicKey
and the givensignature
. Will return true if the givensignature
matches thesignedData
.algorithm
support SHA-256/RSA only
Constants
- beginPrivatekey → const String
- endPrivateKey → const String
- endPublicKey → const String
- startPublickey → const String