82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
/* Get random bytes */
if (objc == 2) {
res = RAND_bytes(out_buf, out_len);
} else {
res = RAND_priv_bytes(out_buf, out_len);
}
if (!res) {
Tcl_AppendResult(interp, "Generate failed: ", REASON(), (char *) NULL);
Tcl_DecrRefCount(resultObj);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, resultObj);
return TCL_OK;
}
|
|
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
/* Get random bytes */
if (objc == 2) {
res = RAND_bytes(out_buf, out_len);
} else {
res = RAND_priv_bytes(out_buf, out_len);
}
if (!res) {
Tcl_AppendResult(interp, "Generate failed: ", GET_ERR_REASON(), (char *) NULL);
Tcl_DecrRefCount(resultObj);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, resultObj);
return TCL_OK;
}
|