Example usage for javax.crypto SecretKey SecretKey

List of usage examples for javax.crypto SecretKey SecretKey

Introduction

In this page you can find the example usage for javax.crypto SecretKey SecretKey.

Prototype

SecretKey

Source Link

Usage

From source file:org.apache.xml.security.test.signature.HMACOutputLengthTest.java

private static SecretKey getSecretKey(final byte[] secret) {
    return new SecretKey() {
        public String getFormat() {
            return "RAW";
        }/*from  w  w  w.  j a  va2  s . c  o m*/

        public byte[] getEncoded() {
            return secret;
        }

        public String getAlgorithm() {
            return "SECRET";
        }
    };
}