Search in sources :

Example 1 with PrivateKey

use of com.github.dedis.popstellar.model.objects.security.PrivateKey in project popstellar by dedis.

the class KeyManager method getKeyPair.

@VisibleForTesting
public KeyPair getKeyPair(KeysetHandle keysetHandle) throws GeneralSecurityException, IOException {
    PrivateKey privateKey = new ProtectedPrivateKey(keysetHandle);
    PublicKey publicKey = getPublicKey(keysetHandle);
    return new KeyPair(privateKey, publicKey);
}
Also used : KeyPair(com.github.dedis.popstellar.model.objects.security.KeyPair) PrivateKey(com.github.dedis.popstellar.model.objects.security.PrivateKey) ProtectedPrivateKey(com.github.dedis.popstellar.model.objects.security.privatekey.ProtectedPrivateKey) PublicKey(com.github.dedis.popstellar.model.objects.security.PublicKey) ProtectedPrivateKey(com.github.dedis.popstellar.model.objects.security.privatekey.ProtectedPrivateKey) VisibleForTesting(androidx.annotation.VisibleForTesting)

Aggregations

VisibleForTesting (androidx.annotation.VisibleForTesting)1 KeyPair (com.github.dedis.popstellar.model.objects.security.KeyPair)1 PrivateKey (com.github.dedis.popstellar.model.objects.security.PrivateKey)1 PublicKey (com.github.dedis.popstellar.model.objects.security.PublicKey)1 ProtectedPrivateKey (com.github.dedis.popstellar.model.objects.security.privatekey.ProtectedPrivateKey)1