NativeCompatibleEncryption class
- AES/ECB/PKCS7 for JSON encryption (no IV)
- RSA PKCS#1 v1.5 to encrypt the session key
- Certificate parsing supports: PEM text, base64(PEM text), base64(DER)
Constructors
- NativeCompatibleEncryption({Uint8List? fixedSessionKey})
- Optionally pass a fixed session key for deterministic testing
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionKey ↔ Uint8List
-
latefinal
Methods
-
createEncryptedRequestPayload(
String json, String base64Cert) → String - Public API: generate the final payload JSON string that matches native output { "Encrypted_skey": "<base64 RSA(sessionKey)>", "Encrypted_data": "<base64 AES-ECB-PKCS7(json bytes)>", "Platform": "2" }
-
encryptDataOnly(
String json) → String - Helpers if you only need one piece
-
encryptSessionKeyOnly(
String base64Cert) → String -
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