|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.security.authentication.util.Signer
public class Signer
Signs strings and verifies signed strings using a SHA digest.
| Constructor Summary | |
|---|---|
Signer(SignerSecretProvider secretProvider)
Creates a Signer instance using the specified SignerSecretProvider. |
|
| Method Summary | |
|---|---|
protected void |
checkSignatures(String rawValue,
String originalSignature)
|
protected String |
computeSignature(byte[] secret,
String str)
Returns then signature of a string. |
String |
sign(String str)
Returns a signed string. |
String |
verifyAndExtract(String signedStr)
Verifies a signed string and extracts the original string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Signer(SignerSecretProvider secretProvider)
secretProvider - The SignerSecretProvider to use| Method Detail |
|---|
public String sign(String str)
str - string to sign.
public String verifyAndExtract(String signedStr)
throws SignerException
signedStr - the signed string to verify and extract.
SignerException - thrown if the given string is not a signed string or if the signature is invalid.
protected String computeSignature(byte[] secret,
String str)
secret - The secret to usestr - string to sign.
protected void checkSignatures(String rawValue,
String originalSignature)
throws SignerException
SignerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||