public class OwSecretKey extends Object
Represents a static secret key used for encryption.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
| Constructor and Description |
|---|
OwSecretKey()
create a key out of the given serialized byte representation
|
| Modifier and Type | Method and Description |
|---|---|
static String |
createJavaCodeKeyDeclaration(String algorithm_p)
dump a java code byte array representation of a secret key
|
static byte[] |
createSerializedKey(String algorithm_p)
create a secret key and return it as a serialized byte array
|
static String |
getAlgorithm()
get the used algorithm
|
Cipher |
getCipher()
get a cipher for the key
|
Key |
getKey()
get the key
|
static void |
main(String[] args_p)
create a new java m_keybytes member
|
public OwSecretKey()
public Cipher getCipher() throws NoSuchAlgorithmException, NoSuchPaddingException
CipherNoSuchAlgorithmExceptionNoSuchPaddingExceptionpublic static byte[] createSerializedKey(String algorithm_p) throws NoSuchAlgorithmException, IOException
algorithm_p - NoSuchAlgorithmExceptionIOExceptionpublic static String createJavaCodeKeyDeclaration(String algorithm_p) throws NoSuchAlgorithmException, IOException
algorithm_p - NoSuchAlgorithmExceptionIOExceptionpublic static void main(String[] args_p)
args_p - Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.