public abstract class Signer
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Signer.ConstSigner
For testing.
|
static class |
Signer.StandardSigner
the standard implementation of the Signer trait.
|
| Constructor and Description |
|---|
Signer() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes(java.lang.String str,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
produce a signature as a byte array
|
abstract byte[] |
getBytes(java.lang.String str,
java.lang.String signatureMethod,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
produce a signature as a byte array
|
static Signer |
getStandardSigner() |
java.lang.String |
getString(java.lang.String str,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
produce an encoded signature string
|
abstract java.lang.String |
getString(java.lang.String str,
java.lang.String signatureMethod,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
produce an encoded signature string
|
abstract byte[] |
toBytes(java.lang.String signature)
decode an existing signature to a byte array
|
public java.lang.String getString(java.lang.String str,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
throws java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException
java.security.InvalidKeyExceptionjava.security.NoSuchAlgorithmExceptionpublic abstract java.lang.String getString(java.lang.String str,
java.lang.String signatureMethod,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
throws java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException
java.security.InvalidKeyExceptionjava.security.NoSuchAlgorithmExceptionpublic byte[] getBytes(java.lang.String str,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionpublic abstract byte[] getBytes(java.lang.String str,
java.lang.String signatureMethod,
java.lang.String tokenSecret,
java.lang.String consumerSecret)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
java.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionpublic abstract byte[] toBytes(java.lang.String signature)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic static Signer getStandardSigner()
Copyright © 2019. All Rights Reserved.