Example #1
0
 public virtual void SetMasterKey(byte[] key)
 {
     lock (this)
     {
         this.masterKey = SecretManager.CreateSecretKey(key);
         Sharpen.Runtime.NotifyAll(this);
     }
 }
Example #2
0
 public ClientToAMTokenSecretManager(ApplicationAttemptId applicationAttemptID, byte
                                     [] key)
     : base()
 {
     // Only one master-key for AM
     if (key != null)
     {
         this.masterKey = SecretManager.CreateSecretKey(key);
     }
     else
     {
         this.masterKey = null;
     }
 }
 /// <summary>Convert the byte[] to a secret key</summary>
 /// <param name="key">the byte[] to create the secret key from</param>
 /// <returns>the secret key</returns>
 protected static SecretKey CreateSecretKey(byte[] key)
 {
     return(SecretManager.CreateSecretKey(key));
 }