public class SigningService extends Object
| Constructor and Description |
|---|
SigningService() |
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.crypto.AsymmetricCipherKeyPair |
generateEdDSAKey() |
org.bouncycastle.crypto.AsymmetricCipherKeyPair |
loadKeyPair(File publicKeyFile,
File privateKeyFile)
Loads the key pairs from the provide file
|
org.bouncycastle.crypto.AsymmetricCipherKeyPair |
loadKeyPair(InputStream publicKeyIn,
InputStream privateKeyIn)
Loads the key pairs from the provide streams
|
byte[] |
signWithPrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey,
byte[] toSign) |
boolean |
verifySignature(org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKeyParameters,
byte[] toSign,
byte[] signature) |
public org.bouncycastle.crypto.AsymmetricCipherKeyPair loadKeyPair(File publicKeyFile, File privateKeyFile) throws IOException
publicKeyFile - the public key .pem fileprivateKeyFile - the private key .pem fileIOException - if the is a problem loading the filespublic org.bouncycastle.crypto.AsymmetricCipherKeyPair loadKeyPair(InputStream publicKeyIn, InputStream privateKeyIn) throws IOException
publicKeyIn - the public key .pem file input streamprivateKeyIn - the private key .pem file input streamIOException - if the is a problem loading the filespublic org.bouncycastle.crypto.AsymmetricCipherKeyPair generateEdDSAKey()
public byte[] signWithPrivateKey(org.bouncycastle.crypto.params.AsymmetricKeyParameter privateKey,
byte[] toSign)
public boolean verifySignature(org.bouncycastle.crypto.params.AsymmetricKeyParameter publicKeyParameters,
byte[] toSign,
byte[] signature)
Copyright © 2021. All rights reserved.