net.corda.core.crypto.java.security.PrivateKey - corda

corda / net.corda.core.crypto / java.security.PrivateKey

### Extensions for java.security.PrivateKey

#### sign | Utility to simplify the act of signing a byte array. `fun PrivateKey.sign(bytesToSign: ByteArray): DigitalSignature` Utility to simplify the act of signing a byte array and return a DigitalSignature.WithKey object. Note that there is no check if the public key matches with the signing private key. `fun PrivateKey.sign(bytesToSign: ByteArray, publicKey: PublicKey): WithKey`