예제 #1
0
파일: GPG.cs 프로젝트: mtmr0x/remote-signer
        public string UnlockKey(GPGUnlockKeyData unlockData)
        {
            try {
                string fingerPrint = pgpManager.UnlockKey(unlockData.FingerPrint, unlockData.Password);
                sm.PutKeyPassword(fingerPrint, unlockData.Password);
            } catch (Exception e) {
                throw new ErrorObjectException(new ErrorObject {
                    ErrorCode  = ErrorCodes.InvalidFieldData,
                    ErrorField = "Password",
                    ErrorData  = e,
                    Message    = "Cannot Decrypt Key"
                });
            }

            return("OK");
        }