diff --git a/lib/nconf/stores/file.js b/lib/nconf/stores/file.js index 5761b0a..0aef8e6 100644 --- a/lib/nconf/stores/file.js +++ b/lib/nconf/stores/file.js @@ -38,8 +38,8 @@ var File = exports.File = function (options) { || 2; if (this.secure) { - this.secure = typeof this.secure === 'string' - ? { secret: this.secure } + this.secure = Buffer.isBuffer(this.secure) || typeof this.secure === 'string' + ? { secret: this.secure.toString() } : this.secure; this.secure.alg = this.secure.alg || 'aes-256-ctr';