Package com.google.k2crypto.keyversions

Examples of com.google.k2crypto.keyversions.AESKeyVersion


  @Test
  public void testEncryptDecrypt() throws DecryptionException, BuilderException,
      EncryptionException {

    // test using the default keyVersion builder
    AESKeyVersion keyversion = new AESKeyVersion.Builder().build();
    testEncryptDecryptKeyVersion(keyversion);

    // test all keyVersion version length WITHOUT mode
    for (Integer keyVersionLength : new Integer[] {16, 24, 32}) {
      // test keyVersion version length of 16 and PKCS5 padding and ECB mode
View Full Code Here


  public KeyVersion addKeyVersion() throws BuilderException {
    /**
     * TODO: Update this to support multiple key versions
     */
    // Create a new KeyVersion
    AESKeyVersion keyversion = new AESKeyVersion.Builder().build();

    // now add it to the Key
    key.addKeyVersion(keyversion);

    // return the key version we just added to the Key
View Full Code Here

TOP

Related Classes of com.google.k2crypto.keyversions.AESKeyVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.