public class SecurityProviderSymmetricKey extends SecurityProvider
| Constructor and Description |
|---|
SecurityProviderSymmetricKey(byte[] symmetricKey,
String registrationId)
Constructor for Symmetric key security provider
|
| Modifier and Type | Method and Description |
|---|---|
String |
getRegistrationId()
Unique id required for registration
|
SSLContext |
getSSLContext()
Retrieves the SSL context loaded with trusted certs.
|
byte[] |
getSymmetricKey()
Getter for Symmetric key
|
byte[] |
HMACSignData(byte[] signature,
byte[] base64DecodedKey)
Signs data using the provided base 64 decoded key using HMAC SHA 256
|
public SecurityProviderSymmetricKey(byte[] symmetricKey,
String registrationId)
symmetricKey - Symmetric key to be usedregistrationId - Registration ID to be usedpublic byte[] getSymmetricKey()
public String getRegistrationId() throws SecurityProviderException
getRegistrationId in class SecurityProviderSecurityProviderException - If registration id with the underlying implementation could not be retrievedpublic SSLContext getSSLContext() throws SecurityProviderException
getSSLContext in class SecurityProviderSecurityProviderException - If ssl context could not be generated for any of the reasonpublic byte[] HMACSignData(byte[] signature,
byte[] base64DecodedKey)
throws SecurityProviderException
signature - Data to be signedbase64DecodedKey - Key used for signingSecurityProviderException - If signing was not successfulCopyright © 2019. All rights reserved.