Ejemplo n.º 1
0
 public virtual void SetMasterKey(byte[] key)
 {
     lock (this)
     {
         this.masterKey = SecretManager.CreateSecretKey(key);
         Sharpen.Runtime.NotifyAll(this);
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 3
0
 /// <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));
 }