Signer
abstract classSigner: Identity
| kotlin.Any | ||
| ↳ | java.security.Identity | |
| ↳ | java.security.Signer | |
This class is used to represent an Identity that can also digitally sign data.
The management of a signer's private keys is an important and sensitive issue that should be handled by subclasses as appropriate to their intended use.
Summary
| Public constructors | |
|---|---|
|
Creates a signer with the specified identity name. |
|
Signer(name: String!, scope: IdentityScope!)Creates a signer with the specified identity name and scope. |
|
| Protected constructors | |
|---|---|
Signer()Creates a signer. |
|
| Public methods | |
|---|---|
| open PrivateKey! |
Returns this signer's private key. |
| Unit |
setKeyPair(pair: KeyPair!)Sets the key pair (public key and private key) for this signer. |
| open String |
toString()Returns a string of information about the signer. |
| Inherited functions | |
|---|---|
Public constructors
Signer
Signer(name: String!)
Creates a signer with the specified identity name.
| Parameters | |
|---|---|
name |
String!: the identity name. |
Signer
Signer(
name: String!,
scope: IdentityScope!)
Creates a signer with the specified identity name and scope.
| Parameters | |
|---|---|
name |
String!: the identity name. |
scope |
IdentityScope!: the scope of the identity. |
| Exceptions | |
|---|---|
java.security.KeyManagementException |
if there is already an identity with the same name in the scope. |
Protected constructors
Signer
protected Signer()
Creates a signer. This constructor should only be used for serialization.
Public methods
getPrivateKey
open fungetPrivateKey(): PrivateKey!
Deprecated: Deprecated in Java.
Returns this signer's private key.
First, if there is a security manager, its checkSecurityAccess method is called with "getSignerPrivateKey" as its argument to see if it's ok to return the private key.
| Return | |
|---|---|
PrivateKey! |
this signer's private key, or null if the private key has not yet been set. |
| Exceptions | |
|---|---|
java.lang.SecurityException |
if a security manager exists and its checkSecurityAccess method doesn't allow returning the private key. |
setKeyPair
funsetKeyPair(pair: KeyPair!): Unit
Deprecated: Deprecated in Java.
Sets the key pair (public key and private key) for this signer.
First, if there is a security manager, its checkSecurityAccess method is called with "setSignerKeyPair" as its argument to see if it's ok to set the key pair.
| Parameters | |
|---|---|
pair |
KeyPair!: an initialized key pair. |
| Exceptions | |
|---|---|
java.security.InvalidParameterException |
if the key pair is not properly initialized. |
java.security.KeyException |
if the key pair cannot be set for any other reason. |
java.lang.SecurityException |
if a security manager exists and its checkSecurityAccess method doesn't allow setting the key pair. |
toString
open funtoString(): String
Deprecated: Deprecated in Java.
Returns a string of information about the signer.
| Return | |
|---|---|
String |
a string of information about the signer. |