X509Utils class

Helper class for certificate operations.

Constructors

X509Utils()

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

BEGIN_CSR → String
final
BEGIN_PRIVATE_KEY → String
final
BEGIN_PUBLIC_KEY → String
final
DN → Map<String, String>
final
END_CSR → String
final
END_PRIVATE_KEY → String
final
END_PUBLIC_KEY → String
final

Static Methods

encodeASN1ObjectToPem(ASN1Object asn1Object, String begin String end) → String
Encode the given asn1Object to PEM format and adding the begin and end.
encodeDN(Map<String, String> dn) ASN1Object
Encode the given dn (Distinguished Name) to a ASN1Object. [...]
encodeRSAPrivateKeyToPem(RSAPrivateKey rsaPrivateKey) → String
Enode the given rsaPrivateKey to PEM format.
encodeRSAPublicKeyToPem(RSAPublicKey publicKey) → String
Enode the given publicKey to PEM format.
formatKeyString(String key, { String begin, { String end, { int chunkSize: 64, String lineDelimiter: "\n" }) → String
Formats the given key by chunking the key and adding the begin and end to the key. [...]
generateKeyPair({int keySize: 2048 }) AsymmetricKeyPair<PublicKey, PrivateKey>
Generates a AsymmetricKeyPair with the given keySize.
generateRsaCsrPem(Map<String, String> attributes, RSAPrivateKey privateKey, RSAPublicKey publicKey) → String
Generates a Certificate Signing Request with the given attributes using the given privateKey and publicKey.
getBytesFromPEMString(String pem) → Uint8List
Helper function for decoding the base64 in pem. [...]
privateKeyFromASN1Sequence(ASN1Sequence asnSequence) RSAPrivateKey
Decode the given asnSequence into an RSAPrivateKey.
privateKeyFromDERBytes(Uint8List bytes) RSAPrivateKey
Decode the given bytes into an RSAPrivateKey.
privateKeyFromPem(String pem) RSAPrivateKey
Decode a RSAPrivateKey from the given pem String.
publicKeyFromPem(String pem) RSAPublicKey
Decode a RSAPublicKey from the given pem String.
rsaPrivateKeyModulusToBytes(RSAPrivateKey privateKey) → Uint8List
Converts the RSAPrivateKey.modulus from the given privateKey to a Uint8List.
rsaPublicKeyExponentToBytes(RSAPublicKey publicKey) → Uint8List
Converts the RSAPublicKey.exponent from the given publicKey to a Uint8List.
rsaPublicKeyModulusToBytes(RSAPublicKey publicKey) → Uint8List
Converts the RSAPublicKey.modulus from the given publicKey to a Uint8List.
x509CertificateFromPem(String pem) X509CertificateData