DVPatchSigning class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
privateKey (String pem )
→ RSAPrivateKey
Reads a PEM RSA private key, PKCS#8 or PKCS#1.
publicKey (String pem )
→ RSAPublicKey
Reads a PEM RSA public key, SubjectPublicKeyInfo or PKCS#1.
releasePublicKey (String publicKeyPem )
→ String
The value a release carries for publicKeyPem: base64 of the DER
PKCS#1 RSAPublicKey, which is what SHOREBIRD_PUBLIC_KEY takes.
releasePublicKeyOf (String privateKeyPem )
→ String
The release public key of privateKeyPem's key pair, so a patch can be
checked against the release before anything is published.
signHash (String hash , String privateKeyPem )
→ String
Signs hash, the hex SHA-256 of the patched file, with the PEM private
key privateKeyPem. Returns the base64 signature the updater verifies.
verifyHash (String hash , String signature , String releasePublicKey )
→ bool
Whether signature (base64) is a signature of hash by the key a
release carries, releasePublicKey -- base64 DER PKCS#1, as in
shorebird.yaml's patch_public_key. Never throws for a bad signature;
a key that cannot be read is an exception, since it is a configuration
fault and not a forged patch.